package com.wp.common.vo;

import com.wp.common.enums.ExceptionEnum;
import lombok.Data;

/**
 * 异常结果集封装
 *
 * @author wp
 * @create 2019-03-03 11:49
 */
@Data
public class ExceptionResult {

    private int status;

    private String message;

    private long timestamp;

    public ExceptionResult(ExceptionEnum em) {
        this.status = em.value();
        this.message = em.message();
        this.timestamp = System.currentTimeMillis();
    }

    public ExceptionResult(int status,String message){
        this.status = status;
        this.message = message;
        this.timestamp = System.currentTimeMillis();
    }
}
